﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.ServiceProcess;
using System.Text;
using System.Windows.Forms;
using WindowServerManager.Util;

namespace WindowServerManager
{
    public partial class FrmWindowServerPath : Form
    {
        public string Path = "";
        public FrmWindowServerPath()
        {
            InitializeComponent();
        }

        public FrmWindowServerPath(string title)
        {
            InitializeComponent();
            this.Text = title;
        }

        private void btnPath_Click(object sender, EventArgs e)
        {
            OpenFileDialog dialog = new OpenFileDialog();
            dialog.Multiselect = false;//该值确定是否可以选择多个文件
            dialog.Title = "请选择文件";
            dialog.Filter = "所有文件(*.exe)|*.exe";
            if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                tbPath.Text = dialog.FileName;
            }
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            Path = this.tbPath.Text;
            this.DialogResult = DialogResult.OK; 
        }
    }
}
